/*
* literature.java
* Created on  2015-4-5 上午10:51
* 版本       修改时间          作者      修改内容
* V1.0.1    2015-4-5       weixuda    初始版本
*
*/
package com.ccut.bits.literature;

import com.ccut.bits.model.Literature;
import com.ccut.bits.page.PageResponse;
import com.ccut.bits.security.service.LiteratureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 类的描述信息
 *
 * @author weixuda
 * @version 1.0.1
 */
@Controller
@RequestMapping("/literature")
public class LiteratureController {

    @Autowired
    private LiteratureService literatureService;

    @RequestMapping("/getLiteratureList")
    public String getLiteratureList() {
        return "literature/getLiteratureList";
    }

    @RequestMapping("/getLiteratureDetail")
    public String getLiteratureDetail() {
        return "literature/getLiteratureDetail";
    }
//这里的跳转问题需要解决一下！！！
    @RequestMapping("/patent/getPatentList")
    public String getPatentList() {
        return "patent/getPatentList";
    }

    @RequestMapping("/getLiteratureListDo")
    @ResponseBody
    public PageResponse<Literature> getLiteratureListDo(Literature literature){
        return new PageResponse<>(literature.getPage(), literatureService.getLiteratureListPage(literature));
    }
}
